package com.xcf.service.business.finance.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.xcf.dao.DaoSupport;
import com.xcf.service.business.finance.ReceiptService;
import com.xcf.util.PageData;
@Service
public class ReceiptServiceImpl implements ReceiptService{
	@Resource
	private DaoSupport dao;
	@Override
	public List<Map> findAllReceiptInfo(PageData pd) throws Exception {
		
		return (List<Map>) dao.findForList("receipt.findAllReview", pd);
	}

	@Override
	public List<Map> findReceiptInfo(PageData pd) throws Exception {
		
		return  (List<Map>) dao.findForList("receipt.findReview", pd);
	}

	@Override
	public void updateReceiptInfo(PageData pd) throws Exception {
		dao.update("receipt.updateInfo", pd);
		
	}

	@Override
	public void updateInfoById(PageData pd) throws Exception {
		dao.update("receipt.updateInfoByid", pd);
		
	}

	@Override
	public PageData findInfoById(String id) throws Exception {
		
		return (PageData) dao.findForObject("receipt.findInfoById", id);
	}

	@Override
	public List<Map> findReviewByCode(String code) throws Exception {
		
		return (List<Map>) dao.findForList("receipt.findReviewByCode", code);
	}

}
